﻿#ifndef QMLSIGNAL_H
#define QMLSIGNAL_H

#include <QObject>
#include <QDebug>

class QMLSignal : public QObject
{
    Q_OBJECT
private:
    QMLSignal();

public:
    static QMLSignal& I();


signals:
    void experimentStatus(QString type, int status);//0实验启动成功,1实验启动失败; 2实验停止成功,3实验停止失败; 4暂停成功,5暂停失败; 6继续成功,7继续失败; 8复位成功,9复位失败; 10急停成功,11急停失败;
    void refExperimentLog();
    void communicationStatus(int status);//0连接成功 1通信断开
    void voiceAssistant(int status);//0连接成功 1通信断开
    void refCommunicationLog();
    void sendErrorMsg(QString errorInfo,QString methodInfo);
    void sendResetMsg(QString status,QString serial);
    void sendSyringRunMsg(QString status,QString serial);
    void syringDataLack();
    void sendAirPumpPressure(QString openVal,QString closeVal);
    void sendTurnTablePos(QString turnTableVal);
    void maintenanceInfoChanged(QString type, QString value);       // type：类型（压紧、压力值等）  value:值（是否/有无/100Mpa）

public:
    void emitExperimentStatus(QString type, int status);// 设备状态
    void emitRefExperimentLog();
    void emitCommunicationStatus(int status);//0连接成功 1通信断开
    void emitVoiceAssistant(int status);//0连接成功 1通信断开
    void emitRefCommunicationLog();
    void emitSendErrorMsg(QString errorInfo,QString methodInfo);
    void emitSendResetMsg(QString status,QString serial);
    void emitSendSyringRunMsg(QString status,QString serial);
    void emitSyringDataLack();
    void emitSendAirPumpPressure(QString openVal,QString closeVal);
    void emitSendTurnTablePos(QString turnTableVal);
    void emitMaintenanceInfoChanged(QString type, QString value);

};
#endif // QMLSIGNAL_H
